package com.HuiShou.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.HuiShou.mapper.RecycleCategoryMapper;
import com.HuiShou.domain.RecycleCategory;
import com.HuiShou.service.IRecycleCategoryService;

/**
 * 可回收物分类Service业务层处理
 *
 * @author lyz
 * @date 2025-02-26
 */
@Service
public class RecycleCategoryServiceImpl implements IRecycleCategoryService
{
    @Autowired
    private RecycleCategoryMapper recycleCategoryMapper;

    /**
     * 查询可回收物分类
     *
     * @param categoryId 可回收物分类主键
     * @return 可回收物分类
     */
    @Override
    public RecycleCategory selectRecycleCategoryByCategoryId(String categoryId)
    {
        return recycleCategoryMapper.selectRecycleCategoryByCategoryId(categoryId);
    }

    /**
     * 查询可回收物分类列表
     *
     * @param recycleCategory 可回收物分类
     * @return 可回收物分类
     */
    @Override
    public List<RecycleCategory> selectRecycleCategoryList(RecycleCategory recycleCategory)
    {
        return recycleCategoryMapper.selectRecycleCategoryList(recycleCategory);
    }

    /**
     * 新增可回收物分类
     *
     * @param recycleCategory 可回收物分类
     * @return 结果
     */
    @Override
    public int insertRecycleCategory(RecycleCategory recycleCategory)
    {
        return recycleCategoryMapper.insertRecycleCategory(recycleCategory);
    }

    /**
     * 修改可回收物分类
     *
     * @param recycleCategory 可回收物分类
     * @return 结果
     */
    @Override
    public int updateRecycleCategory(RecycleCategory recycleCategory)
    {
        return recycleCategoryMapper.updateRecycleCategory(recycleCategory);
    }

    /**
     * 批量删除可回收物分类
     *
     * @param categoryIds 需要删除的可回收物分类主键
     * @return 结果
     */
    @Override
    public int deleteRecycleCategoryByCategoryIds(String[] categoryIds)
    {
        return recycleCategoryMapper.deleteRecycleCategoryByCategoryIds(categoryIds);
    }

    /**
     * 删除可回收物分类信息
     *
     * @param categoryId 可回收物分类主键
     * @return 结果
     */
    @Override
    public int deleteRecycleCategoryByCategoryId(String categoryId)
    {
        return recycleCategoryMapper.deleteRecycleCategoryByCategoryId(categoryId);
    }
}
